{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}

<script type="text/javascript">
    var array = [{$auth_group_access ?? ''}];
    for (var k = 0, length = array.length; k < length; k++) {
        $("[name='uid[]'][value=\'" + array[k] + "\']").attr("checked", true);
    }
</script>
{/block}
{block name="main"}

<div class="page-container">
    
    <form action="{:url(\''.\\think\\Request::instance()->controller().'/access_save')}" method="post" class="form form-horizontal" id="form">
        
        <table class="table table-border table-bordered table-bg table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>
            
            <tbody>
                <tr>
                    <th>
                        角色：
                    </th>
                    <td>
                        {$Request.param.name}
                    </td>
                </tr>

                <tr>
                    <th>
                        用户：
                    </th>
                    <td>
                        <table class="layui-table">
                            <thead>
                                <tr class="text-c">
                                    <th width="40"><input name="nav" type="checkbox">所有用户</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="text-c">
                                    <td>
                                        {volist name="admin" id="vo"}
                                        <div class="che-box">
                                            <input id="{$vo.id}" name="uid[]" type="checkbox" value="{$vo.id}" >
                                            <label for="{$vo.id}">{$vo.name}</label>
                                        </div>
                                        {/volist}
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
            
            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        {:token()}
                        <input type="hidden" value="{$Request.param.id ?? ''}" name="id">
                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">
                        <!-- <button onClick="layer_close();" class="btn radius btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button> -->
                    </td>
                </tr>
            </tfoot>
            
        </table>

    </form>
</div>
{/block}
